$(function(){
    $('#report_user_data_grid').datagrid({
        url:reportUserApiList,
        title:'用户统计',
        fitColumns:true,
        rownumbers:true,
        pageSize:15,
        pageNumber:1,
        pageList:[2,5,10,15,20,25,30,40,50],
        columns:[[
            {field:'nums',title:'总注册用户'},
            {field:'yesterday_regs',title:'昨日注册用户数'},
            {field:'yesterday_logins',title:'昨日登录数'},
            {field:'vday',title:'统计日期'}
        ]],
        onLoadError:function(data){
            var info=eval('('+data.responseText+')');
            $.messager.confirm('错误提示',info.message,function(r){
                var tab=$('#qyTabs').tabs('getSelected');
                var index=$('#qyTabs').tabs('getTabIndex',tab);
                $('#qyTabs').tabs('close',index);
            });
        },
        pagination:true
    });
});